package com.lsh.payment.core.service.payIcp.impl;

import com.lsh.payment.core.dao.payIcp.MerchantImageMapper;
import com.lsh.payment.core.model.icp.MerchantImage;
import com.lsh.payment.core.service.payIcp.IMerchantImageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Project Name: lsh-payment
 * Created by peter on 17/10/26.
 * 北京链商电子商务有限公司
 * Package
 * desc:
 */
@Service
@Transactional(readOnly = true)
public class MerchantImageServiceImpl implements IMerchantImageService {

    @Autowired
    private MerchantImageMapper merchantImageMapper;


    @Override
    @Transactional(rollbackFor = Exception.class)
    public int addMerchantImage(MerchantImage merchantImage) {
        return merchantImageMapper.insertSelective(merchantImage);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public int updateMerchantImage(MerchantImage merchantImage) {
        return merchantImageMapper.updateByPrimaryKeySelective(merchantImage);
    }
}
